﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using App.BaseObject;
using System;
using System.ComponentModel.DataAnnotations;

namespace App.Authorization.Users
{
    /// <summary>
    /// 登录日志
    /// </summary>
    public class LoginLog : Entity, IHasCreationTime, IMayHaveTenant
    {
        [StringLength(ColumnSetting.Long)]
        public virtual string ClientName { get; set; }
        [StringLength(ColumnSetting.Longer)]
        public virtual string BrowserInfo { get; set; }
        [Required]
        [StringLength(ColumnSetting.Short)]
        public virtual string IpAddress { get; set; }
        public virtual LoginResultType Result { get; set; }
        public virtual DateTime CreationTime { get; set; }
        public virtual int? TenantId { get; set; }
        public virtual string TenancyName { get; set; }
        public virtual long? UserId { get; set; }
        public virtual string UserNameOrEmailAddress { get; set; }
    }
}
